﻿using System.Collections.Generic;
using System.Diagnostics;
using System.Xml.Serialization;

namespace SilverCrmSoap.FetchXml
{
    
    
    [DebuggerStepThrough]
    [XmlType("condition",AnonymousType = true)]
    [XmlRoot(Namespace = "", IsNullable = false)]
    public class Condition
    {
        public Condition()
        {
            
        }

        public Condition(string attribute, Operator @operator, string value)
        {
            Attribute = attribute;
            Operator = @operator;
            Value = value;
        }

        [XmlElement("value")]
        public List<ConditionValue> Values { get; set; }

        [XmlAttribute("column")]
        public string Column { get; set; }

        [XmlAttribute("attribute")]
        public string Attribute { get; set; }

        [XmlAttribute("operator")]
        public Operator Operator { get; set; }

        [XmlAttribute("value")]
        public string Value { get; set; }

        [XmlAttribute("aggregate")]
        public Aggregate Aggregate { get; set; }

        [XmlIgnore]
        public bool AggregateSpecified { get; set; }

        [XmlAttribute("alias")]
        public string Alias { get; set; }

        [XmlAttribute("uiname")]
        public string UIName { get; set; }

        [XmlAttribute("uitype")]
        public string UIType { get; set; }

        [XmlAttribute("uihidden")]
        public IntBool UIHidden { get; set; }

        [XmlIgnore]
        public bool UIHiddenSpecified { get; set; }
    }
}